Skip to content

Refactor/replace zerolog with slog - #143

Merged
dstpierre merged 6 commits into
staticbackendhq:mainfrom
amrshaban2005:refactor/replace-zerolog-with-slog
Jul 26, 2026
Merged

Refactor/replace zerolog with slog#143
dstpierre merged 6 commits into
staticbackendhq:mainfrom
amrshaban2005:refactor/replace-zerolog-with-slog

Conversation

@amrshaban2005

@amrshaban2005 amrshaban2005 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces zerolog usage with Go's standard log/slog.

This migration centralizes logger setup in the logger package, configures slog as the default logger, and updates call sites to use package-level slog logging instead of passing logger instances through structs and functions.

Changes

  • Add slog-based logger setup.
  • Add a centralized fatal logging helper.
  • Replace zerolog chained calls with structured slog calls.
  • Remove logger fields from structs where logging can use the global slog default.
  • Update tests and setup code for the new logging approach.

Validation

  • make test-local
  • make test-ci-local-clean

Related issue

Closes #122

@dstpierre

Copy link
Copy Markdown
Member

Hey @amrshaban2005 I had to patch something in hurry and just wanted to review your PR but you'll need to remove the zerolog log I used in the last patch so I can review and test your changes. Thanks

@dstpierre
dstpierre merged commit 4939ca2 into staticbackendhq:main Jul 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace Zerolog with Go's slog

2 participants